package com.chinasofti.filestream;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo01 {
    //创建字节输出流
    public static void main(String[] args) throws IOException {
        //注意：如果文件不存在会帮我们自动创建
        FileOutputStream fileOutputStream = new FileOutputStream("java0418\\fox.txt");
        //将字节写入文件输出流
        fileOutputStream.write(50);
        fileOutputStream.write(98);
        fileOutputStream.write(99);
        //最后释放资源
        fileOutputStream.close();
    }
}
